Skip to content

Added Resource google_compute_global_vm_extension_policy#18013

Merged
malhotrasagar2212 merged 6 commits into
GoogleCloudPlatform:mainfrom
XuechunHou:vme-yaml
Jul 10, 2026
Merged

Added Resource google_compute_global_vm_extension_policy#18013
malhotrasagar2212 merged 6 commits into
GoogleCloudPlatform:mainfrom
XuechunHou:vme-yaml

Conversation

@XuechunHou

@XuechunHou XuechunHou commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Fixes hashicorp/terraform-provider-google#27928

This PR adds support for the new google_compute_global_vm_extension_policy resource to the Google Terraform provider.

Global VM Extension Policies allow you to manage Google software on a fleet of GCE VMs across all zones in a GCP project. Management includes fleetwide installation/uninstallation, configuration management, health reporting, and version upgrades.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

`google_compute_global_vm_extension_policy`

@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jun 19, 2026
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

@malhotrasagar2212, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@XuechunHou XuechunHou changed the title Added global vme extension policy resource and tests. Added Resource google_compute_global_vm_extension_policy Jun 19, 2026
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jun 19, 2026
@modular-magician

modular-magician commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 64ce654:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 2301 insertions(+)
google-beta provider View Diff 5 files changed, 2301 insertions(+)
terraform-google-conversion View Diff 1 file changed, 549 insertions(+)
Open in Cloud Shell View Diff 8 files changed, 251 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_compute_global_vm_extension_policy (2 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_compute_global_vm_extension_policy" "primary" {
  rollout_operation {
    rollout_input {
      conflict_behavior = # value needed
      name              = # value needed
      retry_uuid        = # value needed
    }
    rollout_status {
      current_rollouts {
        location_rollout_status {
          location_name = # value needed
        }
      }
      previous_rollout {
        location_rollout_status {
          location_name = # value needed
        }
      }
    }
  }
}

Missing service labels

The following new resources do not have corresponding service labels:

  • google_compute_global_vm_extension_policy

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

Test report

Analytics

Total Tests Passed Skipped Affected
1484 1390 93 1
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample

🟢 All tests passed!

View the recording VCR build log or the debug logs folder for detailed results.

@XuechunHou, @malhotrasagar2212 VCR tests complete for 64ce654!

@github-actions

Copy link
Copy Markdown

@malhotrasagar2212 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@malhotrasagar2212 malhotrasagar2212 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the missing test report and add coverage.

Comment thread mmv1/products/compute/GlobalVmExtensionPolicy.yaml Outdated
Comment thread mmv1/products/compute/GlobalVmExtensionPolicy.yaml
Comment thread mmv1/products/compute/GlobalVmExtensionPolicy.yaml
Comment thread mmv1/products/compute/GlobalVmExtensionPolicy.yaml
@modular-magician

modular-magician commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 11e4006:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 2331 insertions(+)
google-beta provider View Diff 5 files changed, 2331 insertions(+)
terraform-google-conversion View Diff 1 file changed, 549 insertions(+)
Open in Cloud Shell View Diff 12 files changed, 379 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_compute_global_vm_extension_policy (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_compute_global_vm_extension_policy" "primary" {
  rollout_operation {
    rollout_input {
      name = # value needed
    }
    rollout_status {
      current_rollouts {
        location_rollout_status {
          location_name = # value needed
        }
      }
      previous_rollout {
        location_rollout_status {
          location_name = # value needed
        }
      }
    }
  }
}

Missing service labels

The following new resources do not have corresponding service labels:

  • google_compute_global_vm_extension_policy

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

Test report

Analytics

Total Tests Passed Skipped Affected
1503 1406 94 3
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample
  • TestAccComputeInstance_performanceMonitoringUnit
  • TestAccComputeRouterPeer_AddMd5AuthenticationKey

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample
✅ Log TestAccComputeInstance_performanceMonitoringUnit
✅ Log TestAccComputeRouterPeer_AddMd5AuthenticationKey

🟢 All tests passed!

View the recording VCR build log or the debug logs folder for detailed results.

@XuechunHou, @malhotrasagar2212 VCR tests complete for 11e4006!

@modular-magician

modular-magician commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 32737bc:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 5 files changed, 2331 insertions(+)
google-beta provider View Diff 5 files changed, 2331 insertions(+)
terraform-google-conversion View Diff 1 file changed, 549 insertions(+)
Open in Cloud Shell View Diff 12 files changed, 379 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_compute_global_vm_extension_policy (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_compute_global_vm_extension_policy" "primary" {
  rollout_operation {
    rollout_input {
      name = # value needed
    }
    rollout_status {
      current_rollouts {
        location_rollout_status {
          location_name = # value needed
        }
      }
      previous_rollout {
        location_rollout_status {
          location_name = # value needed
        }
      }
    }
  }
}

Missing service labels

The following new resources do not have corresponding service labels:

  • google_compute_global_vm_extension_policy

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

Test report

Analytics

Total Tests Passed Skipped Affected
1503 1407 94 2
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample
  • TestAccComputeInstance_performanceMonitoringUnit

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeInstance_performanceMonitoringUnit
❌ Error · Log - TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@XuechunHou, @malhotrasagar2212 VCR tests complete for 32737bc!

- Add custom POST delete endpoint with required rollout input body.
- Split VME Policy tests into Basic and Rollout scenarios.
@modular-magician

modular-magician commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 61f385b:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 4 files changed, 2179 insertions(+)
google-beta provider View Diff 4 files changed, 2179 insertions(+)
terraform-google-conversion View Diff 1 file changed, 549 insertions(+)
Open in Cloud Shell View Diff 12 files changed, 378 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_compute_global_vm_extension_policy (4 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_compute_global_vm_extension_policy" "primary" {
  rollout_operation {
    rollout_input {
      name = # value needed
    }
    rollout_status {
      current_rollouts {
        location_rollout_status {
          location_name = # value needed
        }
      }
      previous_rollout {
        location_rollout_status {
          location_name = # value needed
        }
      }
    }
  }
}

Missing service labels

The following new resources do not have corresponding service labels:

  • google_compute_global_vm_extension_policy

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

Test report

Analytics

Total Tests Passed Skipped Affected
1504 1408 94 2
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyRolloutExample

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample
✅ Log TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyRolloutExample

🟢 All tests passed!

View the recording VCR build log or the debug logs folder for detailed results.

@XuechunHou, @malhotrasagar2212 VCR tests complete for 61f385b!

@avnoor-ludhar

Copy link
Copy Markdown
Contributor

Please check the missing test report and add coverage.

I have updated the tests to include coverage for rollout_input. For the name field, we are currently blocked by an upstream error from the VME team, but I will add that test case as soon as the issue is resolved.

Regarding rollout_status, this is a computed-only field generated by the API. As it is not a user-configurable input in Terraform, it has been intentionally omitted from the HCL configuration in the test.

@github-actions

Copy link
Copy Markdown

@malhotrasagar2212 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

# limitations under the License.

---
name: 'GlobalVmExtensionPolicy'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please confirm the launch stage/provider target for this resource?

The API reference appears to expose a v1 path, but the 'VM Extension Policy` user-facing docs and gcloud examples still use beta/preview flows. If this is still Pre-GA, then this should be changes to beta-only. If not its fine.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API is currently in beta, but is planned to release to GA in July/August. I updated the YAML to align with beta, but we will likely have to change this in the near future.

// Skip destroy check to avoid eventual consistency issues of global rollouts.
// The global VM extension policy deletion triggers a background purge rollout
// that can take a few minutes to fully propagate across GCE zones.
return nil

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This destroy check currently returns nil unconditionally. Could we either poll/read until the policy is actually gone, or add a short explanation why a real destroy check is not feasible for the API?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this in my newest commit to keep polling while we are getting a resource via GET, and when we get a 404 to return success. Let me know what you think.

…the YAML configuration with the beta version.
@modular-magician

modular-magician commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 7b10347:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 345 insertions(+)
google-beta provider View Diff 4 files changed, 2212 insertions(+)
terraform-google-conversion View Diff 1 file changed, 549 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_compute_global_vm_extension_policy (4 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_compute_global_vm_extension_policy" "primary" {
  rollout_operation {
    rollout_input {
      name = # value needed
    }
    rollout_status {
      current_rollouts {
        location_rollout_status {
          location_name = # value needed
        }
      }
      previous_rollout {
        location_rollout_status {
          location_name = # value needed
        }
      }
    }
  }
}

Missing service labels

The following new resources do not have corresponding service labels:

  • google_compute_global_vm_extension_policy

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

Test report

Analytics

Total Tests Passed Skipped Affected
1510 1414 94 2
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyRolloutExample

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample
❌ Error · Log - TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyRolloutExample

Caution

Issues requiring attention before PR completion

🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details.

Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer.

View the recording VCR build log or the debug logs folder for detailed results.

@XuechunHou, @malhotrasagar2212 VCR tests complete for 7b10347!

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

@malhotrasagar2212 This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

@GoogleCloudPlatform/terraform-team @malhotrasagar2212 This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

@malhotrasagar2212 malhotrasagar2212 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The `TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyRolloutExample' is currently failing and from the logs it looks like the update operation is returning 503 internal error. Has this been confirmed with the VME/API team as an upstream issue?

@avnoor-ludhar

Copy link
Copy Markdown
Contributor

The `TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyRolloutExample' is currently failing and from the logs it looks like the update operI'ation is returning 503 internal error. Has this been confirmed with the VME/API team as an upstream issue?

There was an upstream error related to custom rollout creations which was needed for a test. I am currently fixing that and will commit the fix soon.

- Support rollout_operation in schema and add custom rollout example
- Add post_delete hook to purge all rollout records tied to the VME policy on deletion
- Fixes RolloutPlan deletion failures caused by leftover rollout references
@modular-magician

modular-magician commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit c7eaa3f:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 1 file changed, 412 insertions(+)
google-beta provider View Diff 4 files changed, 2455 insertions(+)
terraform-google-conversion View Diff 1 file changed, 549 insertions(+)

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_compute_global_vm_extension_policy (5 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_compute_global_vm_extension_policy" "primary" {
  rollout_operation {
    rollout_status {
      current_rollouts {
        location_rollout_status {
          location_name = # value needed
        }
      }
      previous_rollout {
        location_rollout_status {
          location_name = # value needed
        }
      }
    }
  }
}

Test report

Analytics

Total Tests Passed Skipped Affected
1511 1414 94 3
Affected Service Packages
  • compute

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyCustomRolloutExample
  • TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyRolloutExample

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyBasicExample
✅ Log TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyCustomRolloutExample
✅ Log TestAccComputeGlobalVmExtensionPolicy_computeGlobalVmExtensionPolicyRolloutExample

🟢 All tests passed!

View the recording VCR build log or the debug logs folder for detailed results.

@XuechunHou, @malhotrasagar2212 VCR tests complete for c7eaa3f!

@avnoor-ludhar

avnoor-ludhar commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@malhotrasagar2212 The remaining fields are not inputs to the resource, so those can be safely ignored. We have also submitted the CL for maintainer here: cl/935008647.

This new commit should have everything needed for the global policy resource within it!

@malhotrasagar2212 malhotrasagar2212 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add google_compute_zone_vm_extension_policy and google_compute_global_vm_extension_policy Resources

4 participants